package com.zxn.titleviewdemo;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;

import com.zxn.titleview.TitleActionBar;



public class MainActivity extends AppCompatActivity {

    TitleActionBar title4;
    TitleActionBar title5;
    private boolean isShow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        title4 = findViewById(R.id.title4);
        title5 = findViewById(R.id.title5);

        title5.setTitleLeftIconId(R.mipmap.jiantou_bottom);

//        title4.setTitleRightIconId(R.mipmap.jiantou_bottom);

        title4.setOnTitleClickListener(new TitleActionBar.OnTitleClickListener() {
            @Override
            public void onClickTitle(View view) {
                isShow = !isShow;
                title4.showTitleRightIcon(isShow);
            }
        });

        //title4.showTitleRightIcon(false);

    }
}
